package sy.model;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

/**
 * TvehicleInfo entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "tvehicle_info", schema = "")
@DynamicUpdate(true)
@DynamicInsert(true)
public class TvehicleInfo implements java.io.Serializable
{
    
    // Fields    
    
    private String vehicleid;
    
    private String description;
    
    private String maxload;
    
    private String supplierid;
    
    private String ton;
    
    private String vehicletype;
    
    private String volume;
    
    private Set<TsupplierTvehicle> tsupplierTvehicles = new HashSet<TsupplierTvehicle>(0);
    
    private Set<TvehicleToffer> tvehicleToffers = new HashSet<TvehicleToffer>(0);
    
    // Constructors
    
    /** default constructor */
    public TvehicleInfo()
    {
    }
    
    /** minimal constructor */
    public TvehicleInfo(String vehicleid, String maxload, String supplierid, String ton, String vehicletype,
        String volume)
    {
        this.vehicleid = vehicleid;
        this.maxload = maxload;
        this.supplierid = supplierid;
        this.ton = ton;
        this.vehicletype = vehicletype;
        this.volume = volume;
    }
    
    /** full constructor */
    public TvehicleInfo(String vehicleid, String description, String maxload, String supplierid, String ton,
        String vehicletype, String volume, Set<TsupplierTvehicle> tsupplierTvehicles,
        Set<TvehicleToffer> tvehicleToffers)
    {
        this.vehicleid = vehicleid;
        this.description = description;
        this.maxload = maxload;
        this.supplierid = supplierid;
        this.ton = ton;
        this.vehicletype = vehicletype;
        this.volume = volume;
        this.tsupplierTvehicles = tsupplierTvehicles;
        this.tvehicleToffers = tvehicleToffers;
    }
    
    // Property accessors
    @Id
    @Column(name = "vehicleid", unique = true, nullable = false)
    public String getVehicleid()
    {
        return this.vehicleid;
    }
    
    public void setVehicleid(String vehicleid)
    {
        this.vehicleid = vehicleid;
    }
    
    @Column(name = "description")
    public String getDescription()
    {
        return this.description;
    }
    
    public void setDescription(String description)
    {
        this.description = description;
    }
    
    @Column(name = "maxload", nullable = false)
    public String getMaxload()
    {
        return this.maxload;
    }
    
    public void setMaxload(String maxload)
    {
        this.maxload = maxload;
    }
    
    @Column(name = "supplierid", nullable = false)
    public String getSupplierid()
    {
        return this.supplierid;
    }
    
    public void setSupplierid(String supplierid)
    {
        this.supplierid = supplierid;
    }
    
    @Column(name = "ton", nullable = false)
    public String getTon()
    {
        return this.ton;
    }
    
    public void setTon(String ton)
    {
        this.ton = ton;
    }
    
    @Column(name = "vehicletype", nullable = false)
    public String getVehicletype()
    {
        return this.vehicletype;
    }
    
    public void setVehicletype(String vehicletype)
    {
        this.vehicletype = vehicletype;
    }
    
    @Column(name = "volume", nullable = false)
    public String getVolume()
    {
        return this.volume;
    }
    
    public void setVolume(String volume)
    {
        this.volume = volume;
    }
    
    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tvehicle")
    public Set<TsupplierTvehicle> getTsupplierTvehicles()
    {
        return this.tsupplierTvehicles;
    }
    
    public void setTsupplierTvehicles(Set<TsupplierTvehicle> tsupplierTvehicles)
    {
        this.tsupplierTvehicles = tsupplierTvehicles;
    }
    
    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tvehicle")
    public Set<TvehicleToffer> getTvehicleToffers()
    {
        return this.tvehicleToffers;
    }
    
    public void setTvehicleToffers(Set<TvehicleToffer> tvehicleToffers)
    {
        this.tvehicleToffers = tvehicleToffers;
    }
    
}